<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

  <div id="app">
    <!-- <input type="text" :value="message" @input="inputChange"> -->
    <!-- <input type="text" v-model="message"> -->

    <label for="account">
      账号:<input type="text" v-model="account">
    </label>
    <label for="password">
      密码:<input type="text" v-model="password">
    </label>
    <button @click="login">登录</button>
    <h2>{{account}}</h2>
    <h2>{{password}}</h2>
    <h2>{{message}}</h2>

  </div>
  
  <script src="../lib/vue.global.js"></script>
  <script>
    // 1.创建app
    const app = Vue.createApp({
      // data: option api
      data() {
        return {
          message: "Hello Model",
          account: "",
          password: ""
        }
      },
      methods: {
        // inputChange(event){
        //   this.message=event.target.value
        // }

       login(){
       console.log(this.account,this.password)
       }
      }
    })

    // 2.挂载app
    app.mount("#app")
  </script>
</body>
</html>